package com.se2.antiqueexhibition.Service.impl;

import com.se2.antiqueexhibition.Mapper.CollectionMapper;
import com.se2.antiqueexhibition.Service.CollectionService;
import com.se2.antiqueexhibition.pojo.CulturalRelic;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollectionServiceimpl implements CollectionService {
    @Resource
    private CollectionMapper collectionMapper;

    @Override
    public void addCollection(int userId, int id) {
        collectionMapper.addCollection(userId, id);
    }

    @Override
    public void cancelCollection(int userId,int id) {
        collectionMapper.cancelCollection(userId,id);
    }

    @Override
    public List<CulturalRelic> showCollection(int userId) {
        return collectionMapper.showCollection(userId);
    }

    @Override
    public List<Integer> getCollectionIdsByUserId(int userId) {
        return collectionMapper.getCollectionIdsByUserId(userId);
    }
}
